package easybooking.report;

import java.io.Serializable;
import java.util.Vector;

/**
 * A simple report, which contains the information of the super class <code>
 * Report</code> and a table with "positional data". The table gets access to the two helping
 * classes <code>Row</code> and <code>Column</code>.
 *
 * @see Row
 * @see Column
 * @author Hakan Keles
 */
public abstract class SimpleReport
        extends Report
        implements Serializable {

    /**
     * Table with positional data. The table is storaged line by line in a
     * <code>Vector</code>.
     */
    private Vector<Row> table = new Vector<Row>();

    /**
     * Add a row.
     * @param r the added row.
     */
    public void addRow(Row r) {
        this.table.addElement(r);
    }

    /**
     * Remove a row.
     * @param r the removed row.
     */
    public void removeRow(Row r) {
        this.table.removeElement(r);
    }

    /**
     * Readout all rows.
     * @return the table of positional data.
     */
    public Vector<Row> getRows() {
        return this.table;
    }
}
